Skip to content

Add/Delete User in Org/Project#737

Merged
Ayush8923 merged 14 commits intofeat/google-integration-auth-flowfrom
feat/add-user-project
Apr 9, 2026
Merged

Add/Delete User in Org/Project#737
Ayush8923 merged 14 commits intofeat/google-integration-auth-flowfrom
feat/add-user-project

Conversation

@Ayush8923
Copy link
Copy Markdown
Collaborator

@Ayush8923 Ayush8923 commented Apr 2, 2026

Target issue: #731

Summary

  • Created the API Endpoint where to add the more user in the corresponding to Org/Project.
  • Created the user_project table where we have the mapping of user corresponding to their org and project for tracking.
  • Mark the user is_active=True after google login and when super admin add the new user in corresponding to any project then mark the is_active=False.
  • Handle Project Permission

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

To sync existing users and their corresponding org/project with the new user_project table, we need to run this query.

INSERT INTO user_project (user_id, organization_id, project_id, inserted_at)
SELECT DISTINCT ak.user_id, ak.organization_id, ak.project_id, NOW()
FROM apikey ak
WHERE ak.is_deleted = false
AND NOT EXISTS (
    SELECT 1 FROM user_project up
    WHERE up.user_id = ak.user_id
    AND up.project_id = ak.project_id
);

@Ayush8923 Ayush8923 self-assigned this Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 98cff627-4e47-422b-ad03-e137ab7478e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-user-project

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@@ -34,8 +35,24 @@


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have commont auth.py route instead of google_auth.py?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, updated.

@Ayush8923 Ayush8923 merged commit 74d252b into feat/google-integration-auth-flow Apr 9, 2026
1 check passed
@Ayush8923 Ayush8923 deleted the feat/add-user-project branch April 9, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants